const singleSpaAngularWebpack = require('single-spa-angular/lib/webpack').default;

module.exports = (config, options) => {
  const singleSpaWebpackConfig = singleSpaAngularWebpack(config, options);

  // Feel free to modify this webpack config however you'd like to
  return singleSpaWebpackConfig;
};

// const singleSpaAngularWebpack = require('single-spa-angular/lib/webpack').default;
// const {merge } = require("webpack-merge");
// const appName = require('./package.json').name;

// module.exports = (config, options) => {
//   const singleSpaWebpackConfig = singleSpaAngularWebpack(config, options);

//   const singleSpaConfig = {
//     devServer: {
//       headers: {
//         'Access-Control-Allow-Origin': '*',
//       },
//     },
//     output: {
//       library: `${appName}-[name]`,
//       libraryTarget: "umd",
//     },
//     externals: {
//       "zone.js": "Zone",
//     },
//   };
//   const mergedConfig = merge (
//     singleSpaWebpackConfig,
//     singleSpaConfig
//   );
//   return mergedConfig;

// };
